package entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 商品实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Product ", description = "商品实体类")
public class Product {


    @ApiModelProperty(hidden = true)
    private String id;


    @NotEmpty(message = "商品名称不能为空")
    @ApiModelProperty(name = "productName", value = "商品名称", example = "")
    private String productName;


    @ApiModelProperty(name = "price", value = "商品价格", example = "")
    private BigDecimal price;


    @ApiModelProperty(name = "createTime", value = "创建时间", example = "")
    private Date createTime;


    @ApiModelProperty(name = "updateTime", value = "更新时间", example = "")
    private Date updateTime;


    @ApiModelProperty(name = "createUserId", value = "创建人ID", example = "")
    private String createUserId;


    @ApiModelProperty(name = "updateUserId", value = "修改人ID", example = "")
    private String updateUserId;


    @NotEmpty(message = "商品描述不能为空")
    @ApiModelProperty(name = "description", value = "商品描述", example = "")
    private String description;


    @ApiModelProperty(name = "isDeleted", value = "是否删除 0有效 1无效", example = "")
    private Integer isDeleted;


    @ApiModelProperty(name = "productImages", value = "商品图片 图片路径数组", example = "")
    private String productImages;


    @ApiModelProperty(name = "sellCount", value = "销量", example = "")
    private Integer sellCount;


    @ApiModelProperty(name = "deserveCount", value = "库存", example = "")
    private Integer deserveCount;


    @ApiModelProperty(name = "viewCount", value = "浏览量", example = "")
    private Integer viewCount;

}
